import pandas as pd

def csv_table_to_train_date(name,test_data):
    train_date = pd.DataFrame([], columns=['ID', 'txt', 'label'])
    train_date['label'] = test_data['label']
    train_date['txt'] = test_data['text']
    train_date['ID'] = train_date.reset_index().index
    train_date.to_csv('./linux/nlp_tiktok_date/train' + name + '.csv', index=False, encoding='utf_8_sig')